﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	mc:Ignorable="d" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
	xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 
	xmlns:n="http://nRoute/schemas/2010/xaml"
	xmlns:nRoute_Samples_Sudoku_Behaviors="clr-namespace:nRoute.Samples.Sudoku.Behaviors;assembly=nRoute.Samples.Sudoku.Common" 
	xmlns:nRoute_Samples_Sudoku_Controls="clr-namespace:nRoute.Samples.Sudoku.Controls" 
	x:Class="nRoute.Samples.Sudoku.Views.GameView" 
    d:DesignWidth="420" d:DesignHeight="550" Width="420" Height="550" Background="#FF8E98FF">
    
	<UserControl.Resources>
        
        <!-- BRUSHES -->
        <LinearGradientBrush x:Key="ScreenBkgBrush"
                             EndPoint="0.5,1"
                             StartPoint="0.5,0">
            <GradientStop Color="#FF1A181C" />
            <GradientStop Color="Black"
                          Offset="1" />
        </LinearGradientBrush>

        <!-- COMPONENTS -->
		<n:CommandRelay x:Key="SetBoxValueCommandRelay" />
		<n:ValueConverterRelay x:Key="BoxValueConverterRelay" />
		<n:ValueConverterRelay x:Key="IsPredefineConverterRelay" />
		<n:ValueConverterRelay x:Key="IsNotPredefineConverterRelay" />
		<n:ValueConverterRelay x:Key="TitleConverterRelay" />
		
        <!-- STORYBOARDS -->
		<Storyboard x:Name="ShowMessageStoryboard">
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="messageBorder" 
                Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="messageBorder" 
                Storyboard.TargetProperty="(UIElement.Opacity)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuarticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="HideMessageStoryboard">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="messageBorder" 
                Storyboard.TargetProperty="(UIElement.Opacity)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.6000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="messageBorder" 
                Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00.6000000">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Collapsed</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.4000000" Value="-90">
					<EasingDoubleKeyFrame.EasingFunction>
						<CubicEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="ShowBoxValueStoryboard">
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                Storyboard.TargetName="boxValueBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="boxValueBorder" 
                Storyboard.TargetProperty="(UIElement.Opacity)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuarticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border1" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CircleEase EasingMode="EaseOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="HideBoxValueStoryboard">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="boxValueBorder" 
                Storyboard.TargetProperty="(UIElement.Opacity)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0">
					<EasingDoubleKeyFrame.EasingFunction>
						<CircleEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="boxValueBorder" 
                Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00.4000000">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Collapsed</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border1" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-90">
					<EasingDoubleKeyFrame.EasingFunction>
						<ExponentialEase EasingMode="EaseIn"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		
	</UserControl.Resources>
    
    <!-- BEHAVIOURS -->
	<i:Interaction.Behaviors>
		<n:BridgeViewModelBehavior/>
		<n:BridgeCommandBehavior 
			CommandRelay="{StaticResource SetBoxValueCommandRelay}"
			CommandSource="{Binding SetBoxValueCommand, Mode=OneWay}"/>
	</i:Interaction.Behaviors>
    
    <!-- ROOT -->
	<Grid x:Name="LayoutRoot" Clip="M0,0 L420,0 L420,550 L0,550 z" Background="{StaticResource ScreenBkgBrush}">
		<VisualStateManager.CustomVisualStateManager>
			<ic:ExtendedVisualStateManager/>
		</VisualStateManager.CustomVisualStateManager>
        
        <!-- VISUAL STATES -->
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="ScreenStateGroup">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="00:00:00.6000000">
						<VisualTransition.GeneratedEasingFunction>
							<QuinticEase EasingMode="EaseOut"/>
						</VisualTransition.GeneratedEasingFunction>
					</VisualTransition>
					<VisualTransition From="HomeScreenState" GeneratedDuration="00:00:00.5000000" To="GameScreenState">
						<VisualTransition.GeneratedEasingFunction>
							<QuinticEase EasingMode="EaseIn"/>
						</VisualTransition.GeneratedEasingFunction>
						<Storyboard>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="MenuGrid" Storyboard.TargetProperty="(UIElement.Opacity)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.6000000" Storyboard.TargetName="MenuGrid" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" To="70"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton1" Storyboard.TargetProperty="(UIElement.Opacity)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton2" Storyboard.TargetProperty="(UIElement.Opacity)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton3" Storyboard.TargetProperty="(UIElement.Opacity)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton4" Storyboard.TargetProperty="(UIElement.Opacity)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton" Storyboard.TargetProperty="(UIElement.Opacity)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton3" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="GameGrid" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" To="0"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="GameGrid" Storyboard.TargetProperty="(UIElement.Opacity)" To="1"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.Opacity)" To="1"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" To="0"/>
						</Storyboard>
					</VisualTransition>
					<VisualTransition From="GameScreenState" GeneratedDuration="00:00:00.5000000" To="HomeScreenState">
						<VisualTransition.GeneratedEasingFunction>
							<QuarticEase EasingMode="EaseOut"/>
						</VisualTransition.GeneratedEasingFunction>
						<Storyboard>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.6000000" Storyboard.TargetName="GameGrid" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" To="70"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="GameGrid" Storyboard.TargetProperty="(UIElement.Opacity)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.Opacity)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="MenuGrid" Storyboard.TargetProperty="(UIElement.Opacity)" To="1"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="MenuGrid" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" To="0"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton1" Storyboard.TargetProperty="(UIElement.Opacity)" To="1"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton2" Storyboard.TargetProperty="(UIElement.Opacity)" To="1"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton3" Storyboard.TargetProperty="(UIElement.Opacity)" To="1"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton4" Storyboard.TargetProperty="(UIElement.Opacity)" To="1"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton" Storyboard.TargetProperty="(UIElement.Opacity)" To="1"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" To="0"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" To="0"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton3" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" To="0"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" To="0"/>
							<DoubleAnimation BeginTime="00:00:00" Duration="00:00:00.5630000" Storyboard.TargetName="hyperlinkButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" To="0"/>
						</Storyboard>
					</VisualTransition>
					<VisualTransition From="BlankState" GeneratedDuration="00:00:02" To="HomeScreenState">
						<VisualTransition.GeneratedEasingFunction>
							<QuinticEase EasingMode="EaseOut"/>
						</VisualTransition.GeneratedEasingFunction>
					</VisualTransition>
				</VisualStateGroup.Transitions>
				
				<VisualState x:Name="BlankState"/>
				<VisualState x:Name="HomeScreenState">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MenuGrid" Storyboard.TargetProperty="(UIElement.Opacity)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="MenuGrid" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hyperlinkButton1" Storyboard.TargetProperty="(UIElement.Opacity)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hyperlinkButton2" Storyboard.TargetProperty="(UIElement.Opacity)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hyperlinkButton3" Storyboard.TargetProperty="(UIElement.Opacity)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hyperlinkButton4" Storyboard.TargetProperty="(UIElement.Opacity)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hyperlinkButton" Storyboard.TargetProperty="(UIElement.Opacity)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hyperlinkButton1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hyperlinkButton2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hyperlinkButton3" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hyperlinkButton4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="hyperlinkButton" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Duration="00:00:00.0010000">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="GameScreenState">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="GameGrid" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="GameGrid" Storyboard.TargetProperty="(UIElement.Opacity)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.Opacity)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="textBlock" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
        
        <!-- REVERSE TRIGGER -->
		<i:Interaction.Triggers>
			<n:ReverseCommandTrigger ReverseCommand="{Binding ViewBoardReverseCommand, Mode=OneWay}">
				<ic:GoToStateAction StateName="GameScreenState"/>
			</n:ReverseCommandTrigger>
			<i:EventTrigger EventName="Loaded">
				<ic:GoToStateAction StateName="BlankState"/>
			</i:EventTrigger>
			<nRoute_Samples_Sudoku_Behaviors:DelayTrigger DelayDuration="00:00:03">
				<ic:GoToStateAction StateName="HomeScreenState"/>
			</nRoute_Samples_Sudoku_Behaviors:DelayTrigger>
		</i:Interaction.Triggers>
        
        <!-- GAME SCREEN -->
		
        <!-- HOME SCREEN -->
		<Grid x:Name="GameGrid" RenderTransformOrigin="0.5,0.5" Opacity="0" Background="{StaticResource ScreenBkgBrush}" d:IsLocked="True">
			<Grid.Projection>
				<PlaneProjection RotationY="-70" CenterOfRotationX="0"/>
			</Grid.Projection>
			<Grid.RowDefinitions>
				<RowDefinition Height="55"/>
				<RowDefinition/>
				<RowDefinition Height="55"/>
			</Grid.RowDefinitions>
            
            <!-- TOP PANEL -->
			
			<TextBlock x:Name="textBlock" Text="{Binding Game.Level, Converter={StaticResource TitleConverterRelay}, Mode=OneWay}"
				FontSize="86.667" Foreground="White" FontFamily="Segoe UI Light" HorizontalAlignment="Left" 
				Margin="104,-48,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" Opacity="0">
				<TextBlock.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform X="30"/>
					</TransformGroup>
				</TextBlock.RenderTransform>
			</TextBlock>
            
<!-- TOP PANEL -->
			
			<HyperlinkButton Foreground="White" IsTabStop="False" Padding="0">
				<i:Interaction.Triggers>
					<i:EventTrigger EventName="Click">
						<ic:GoToStateAction StateName="HomeScreenState"/>
					</i:EventTrigger>
				</i:Interaction.Triggers>
				<Path Stretch="Fill" Stroke="#FFE0E0E0" StrokeThickness="3" Width="62" UseLayoutRounding="False" Data="M137.5,70 C137.5,107.27922 107.27922,137.5 70,137.5 C32.720779,137.5 2.5,107.27922 2.5,70 C2.5,32.720779 32.720779,2.5 70,2.5 C107.27922,2.5 137.5,32.720779 137.5,70 z M33.166992,72.333008 L111.16699,72.333008 M70.833,32.333019 L109.846,71.346016 M112.49997,70.5 L74.969971,108.03" Cursor="Hand" RenderTransformOrigin="0.5,0.5" Fill="#00FF0000" Height="62" VerticalAlignment="Bottom" Margin="0,-15,0,0">
					<Path.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleX="-1"/>
							<SkewTransform AngleX="0" AngleY="0"/>
							<RotateTransform Angle="0"/>
							<TranslateTransform/>
						</TransformGroup>
					</Path.RenderTransform>
				</Path>
			</HyperlinkButton>
            
<!-- BOARD PANEL -->
			<Border Grid.Row="1" BorderThickness="0,2">
				<Border.BorderBrush>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="Black" Offset="0.011"/>
						<GradientStop Color="#FF202020" Offset="0.989"/>
						<GradientStop Color="#FF050505" Offset="1"/>
						<GradientStop Color="#FF323232"/>
					</LinearGradientBrush>
				</Border.BorderBrush>
				<Grid>
					<Grid.RowDefinitions>
						<RowDefinition/>
						<RowDefinition/>
						<RowDefinition/>
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition/>
						<ColumnDefinition/>
						<ColumnDefinition/>
					</Grid.ColumnDefinitions>
					
					<!-- ITEMS CONTROL -->
					<ItemsControl Grid.ColumnSpan="3" Grid.RowSpan="3" ItemsSource="{Binding Game.Board, Mode=OneWay}">
						
						<!-- PANEL TEMPLATE -->
						<ItemsControl.ItemsPanel>
							<ItemsPanelTemplate>
								<Grid>
									<Grid.RowDefinitions>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
									</Grid.RowDefinitions>
									<Grid.ColumnDefinitions>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
									</Grid.ColumnDefinitions>
								</Grid>
							</ItemsPanelTemplate>
						</ItemsControl.ItemsPanel>
                        
						<!-- ITEM TEMPLATE -->
						<ItemsControl.ItemTemplate>
							<DataTemplate>
								<Grid>
                                    
									<!-- POSITION BEHAVIOR -->
									<i:Interaction.Behaviors>
										<nRoute_Samples_Sudoku_Behaviors:SetParentGridPosBehavior 
											Col="{Binding Row, Mode=OneWay}" 
											Row="{Binding Col, Mode=OneWay}" />
									</i:Interaction.Behaviors>
                                    
									<!-- GREY'ISH/PREDEFINED BORDER -->
									<Border Background="#FF262626" BorderBrush="#FF909090" 
										BorderThickness="0,0,0.5,0.5" 
										Visibility="{Binding Converter={StaticResource IsPredefineConverterRelay}}">
										<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32" 
											Text="{Binding ExpectedValue, Converter={StaticResource BoxValueConverterRelay}, Mode=OneWay}">
											<TextBlock.Foreground>
												<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
													<GradientStop Color="#FFAFA0A0" Offset="1"/>
													<GradientStop Color="#FFD2D2D2" Offset="0.062"/>
												</LinearGradientBrush>
											</TextBlock.Foreground>
										</TextBlock>
									</Border>
                                    
									<Border Background="#00000000" Cursor="Hand"
										Visibility="{Binding Converter={StaticResource IsNotPredefineConverterRelay}}"
										BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5">
										<i:Interaction.Triggers>
											<i:EventTrigger EventName="MouseLeftButtonUp">
												<n:ExecuteCommandAction Command="{StaticResource SetBoxValueCommandRelay}"
													Parameter="{Binding ''}"/>
											</i:EventTrigger>
										</i:Interaction.Triggers>
										<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32" 
											Text="{Binding SuggestedValue, Converter={StaticResource BoxValueConverterRelay}, Mode=OneWay}">
											<TextBlock.Foreground>
												<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
													<GradientStop Color="#FF3B5C88" Offset="0.574"/>
													<GradientStop Color="#FF3389C3"/>
												</LinearGradientBrush>
											</TextBlock.Foreground>
										</TextBlock>
									</Border>
								</Grid>
							</DataTemplate>
						</ItemsControl.ItemTemplate>
					</ItemsControl>
					
					<!-- TOP LINES -->
					<Path Stretch="Fill" Stroke="#FF0C0C0C" HorizontalAlignment="Right" Width="3" 
						UseLayoutRounding="False" Grid.RowSpan="3" Data="M126,11 L126,314.0264" Fill="Black" StrokeThickness="4" Margin="0,-1"/>
					<Path Stretch="Fill" Stroke="#FF0C0C0C" HorizontalAlignment="Right" Width="3" 
						UseLayoutRounding="False" Grid.Column="1" Grid.RowSpan="3" Data="M126,11 L126,314.0264" Fill="Black" StrokeThickness="4" Margin="0,-1"/>
					<Path Stretch="Fill" Stroke="#FF0C0C0C" Height="3" VerticalAlignment="Bottom" 
						UseLayoutRounding="False" Grid.ColumnSpan="3" Data="M23,152 L413.18457,152" Fill="Black" StrokeThickness="4" Margin="-1,0"/>
					<Path Stretch="Fill" Stroke="#FF0C0C0C" Height="3" VerticalAlignment="Bottom" 
						UseLayoutRounding="False" Grid.ColumnSpan="3" Grid.Row="1" Data="M23,152 L413.18457,152" Fill="Black" StrokeThickness="4" Margin="-1,0"/>
				</Grid>
			</Border>
            
<!-- BOTTOM PANEL -->
			<StackPanel Grid.Row="2" Orientation="Horizontal" d:LayoutOverrides="Width" VerticalAlignment="Center" HorizontalAlignment="Center">
				<Canvas Width="42" Height="42" Margin="5,0" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding ConfirmCommand, Mode=OneWay}"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<Path Stretch="Fill" Stroke="White" StrokeThickness="2" Width="42" UseLayoutRounding="False" Data="M34.5,18 C34.5,27.112698 27.112698,34.5 18,34.5 C8.8873014,34.5 1.5,27.112698 1.5,18 C1.5,8.8873014 8.8873014,1.5 18,1.5 C27.112698,1.5 34.5,8.8873014 34.5,18 z" Cursor="Hand" RenderTransformOrigin="0.5,0.5" Fill="#00FF0000" Height="42" VerticalAlignment="Bottom">
						<Path.RenderTransform>
							<TransformGroup>
								<ScaleTransform ScaleX="-1"/>
								<SkewTransform AngleX="0" AngleY="0"/>
								<RotateTransform Angle="0"/>
								<TranslateTransform/>
							</TransformGroup>
						</Path.RenderTransform>
					</Path>
					<Path Fill="White" Stretch="Fill" Height="17.5" Width="16.333" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" Canvas.Left="12.333" Canvas.Top="12.194" Data="M25.666437,11.194391 L25.666437,18.194328 L15.166532,28.694235 L9.33325,22.860954 L9.33325,15.861016 L15.166532,21.676067 z">
						<Path.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform/>
							</TransformGroup>
						</Path.RenderTransform>
					</Path>
				</Canvas>
				<Canvas Width="42" Height="42" Margin="5,0" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding HintCommand, Mode=OneWay}"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<Path Stretch="Fill" Stroke="White" StrokeThickness="2" UseLayoutRounding="False" Data="M34.5,18 C34.5,27.112698 27.112698,34.5 18,34.5 C8.8873014,34.5 1.5,27.112698 1.5,18 C1.5,8.8873014 8.8873014,1.5 18,1.5 C27.112698,1.5 34.5,8.8873014 34.5,18 z" Cursor="Hand" RenderTransformOrigin="0.5,0.5" Fill="#00FF0000" Height="42" VerticalAlignment="Bottom" Width="42">
						<Path.RenderTransform>
							<TransformGroup>
								<ScaleTransform ScaleX="-1"/>
								<SkewTransform AngleX="0" AngleY="0"/>
								<RotateTransform Angle="0"/>
								<TranslateTransform/>
							</TransformGroup>
						</Path.RenderTransform>
					</Path>
					<Path Fill="White" Stretch="Fill" Height="23.297" Width="14.782" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" Canvas.Left="13.406" Canvas.Top="9.196" Data="M7.203125,26.290209 L10.40625,26.290209 L10.40625,29.493334 L7.203125,29.493334 z M8.828125,6.1964588 C11.067708,6.1964588 12.854167,6.8058338 14.1875,8.0245838 C15.520833,9.2433338 16.1875,10.717293 16.1875,12.446459 C16.1875,13.446459 15.953125,14.368334 15.484375,15.212084 C15.015625,16.055834 14.098958,17.081875 12.734375,18.290209 C11.817708,19.102709 11.21875,19.701668 10.9375,20.087084 C10.65625,20.4725 10.447917,20.915209 10.3125,21.415209 C10.177083,21.915209 10.098958,22.727709 10.078125,23.852709 L7.375,23.852709 C7.3645835,23.477709 7.359375,23.196459 7.359375,23.008959 C7.359375,21.904793 7.515625,20.951668 7.828125,20.149584 C8.057292,19.545418 8.427083,18.936043 8.9375,18.321459 C9.3125,17.873543 9.9869795,17.219896 10.960938,16.360521 C11.934896,15.501146 12.567708,14.816251 12.859375,14.305834 C13.151042,13.795417 13.296875,13.238125 13.296875,12.633959 C13.296875,11.540209 12.869792,10.579271 12.015625,9.7511463 C11.161458,8.9230213 10.114583,8.5089588 8.875,8.5089588 C7.6770835,8.5089588 6.6770835,8.8839588 5.875,9.6339588 C5.0729165,10.383959 4.546875,11.555834 4.296875,13.149584 L1.40625,12.805834 C1.6666666,10.670418 2.4401042,9.0349998 3.7265627,7.8995838 C5.013021,6.7641678 6.7135415,6.1964588 8.828125,6.1964588 z">
						<Path.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform/>
							</TransformGroup>
						</Path.RenderTransform>
					</Path>
				</Canvas>
				<Canvas Height="42" Margin="5,0" Width="42" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding SolveCommand, Mode=OneWay}"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<Path Stretch="Fill" Stroke="White" StrokeThickness="2" Width="42" UseLayoutRounding="False" Data="M34.5,18 C34.5,27.112698 27.112698,34.5 18,34.5 C8.8873014,34.5 1.5,27.112698 1.5,18 C1.5,8.8873014 8.8873014,1.5 18,1.5 C27.112698,1.5 34.5,8.8873014 34.5,18 z" Cursor="Hand" RenderTransformOrigin="0.5,0.5" Fill="#00FF0000" Height="42" VerticalAlignment="Bottom">
						<Path.RenderTransform>
							<TransformGroup>
								<ScaleTransform ScaleX="-1"/>
								<SkewTransform AngleX="0" AngleY="0"/>
								<RotateTransform Angle="0"/>
								<TranslateTransform/>
							</TransformGroup>
						</Path.RenderTransform>
					</Path>
					<Path Fill="White" Stretch="Fill" Height="25.623" Width="19.966" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" Canvas.Left="12.478" Canvas.Top="7.75" Data="M11.844917,18.072269 L11.844917,21.008432 C13.258096,20.32094 13.964685,19.743256 13.964685,19.275379 C13.964685,18.664276 13.258096,18.263237 11.844917,18.072269 z M21.741941,11.712965 C20.004112,12.543685 18.299706,12.959045 16.628717,12.959045 C15.826643,12.959045 15.11528,12.901754 14.494627,12.787172 L14.494627,19.404285 C14.494627,20.158615 14.084042,20.726751 13.26287,21.108692 L12.876156,21.280565 C12.064533,21.652958 11.658722,22.030123 11.658722,22.412064 C11.658722,22.889488 12.181502,23.314396 13.227063,23.686789 C14.272624,24.059179 15.449477,24.245375 16.757622,24.245375 C18.590935,24.245375 20.252375,23.724981 21.741941,22.684195 z M10.083219,5.8692818 C8.0971298,5.8692818 6.1587844,6.7238731 4.2681808,8.433054 L4.2681808,19.361317 C5.9964595,17.909943 7.9634514,17.184258 10.169155,17.184258 C11.458203,17.184258 12.666089,17.432518 13.792812,17.929041 L13.792812,9.0775795 C13.792812,6.938715 12.556281,5.8692818 10.083219,5.8692818 z M3.5377202,3.7495136 C4.2538581,3.7495136 4.6119266,4.0741634 4.6119266,4.7234612 C4.6119266,4.9812717 4.497345,5.2295322 4.2681808,5.4682446 L4.2681808,7.5163994 C6.0728478,5.9504433 8.0111933,5.1674671 10.083219,5.1674671 C13.024158,5.1674671 14.494627,6.437418 14.494627,8.9773197 L14.494627,12.085357 C17.492857,12.591428 20.142567,12.008969 22.443756,10.33798 L22.443756,22.999296 C20.791864,24.297892 18.867842,24.947189 16.671686,24.947189 C15.172571,24.947189 13.876362,24.727575 12.783058,24.288343 C11.689754,23.849112 11.143103,23.328718 11.143103,22.727163 L11.143103,17.972008 C10.665677,17.914719 10.321932,17.886072 10.111864,17.886072 C7.9252572,17.886072 5.9773626,18.712017 4.2681808,20.363909 L4.2681808,29.372921 L2.8502281,29.372921 L2.8502281,5.4682446 C2.6019669,5.2581768 2.4778364,5.0099163 2.4778364,4.7234612 C2.4778364,4.0741634 2.831131,3.7495136 3.5377202,3.7495136 z" StrokeThickness="0">
						<Path.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform/>
							</TransformGroup>
						</Path.RenderTransform>
					</Path>
				</Canvas>
				<Canvas Height="42" Margin="5,0" Width="42" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding ResetCommand, Mode=OneWay}"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<Path Stretch="Fill" Stroke="White" StrokeThickness="2" UseLayoutRounding="False" Data="M34.5,18 C34.5,27.112698 27.112698,34.5 18,34.5 C8.8873014,34.5 1.5,27.112698 1.5,18 C1.5,8.8873014 8.8873014,1.5 18,1.5 C27.112698,1.5 34.5,8.8873014 34.5,18 z" Cursor="Hand" RenderTransformOrigin="0.5,0.5" Fill="#00FF0000" Height="42" VerticalAlignment="Bottom" Width="42">
						<Path.RenderTransform>
							<TransformGroup>
								<ScaleTransform ScaleX="-1"/>
								<SkewTransform AngleX="0" AngleY="0"/>
								<RotateTransform Angle="0"/>
								<TranslateTransform/>
							</TransformGroup>
						</Path.RenderTransform>
					</Path>
					<Path Fill="White" Stretch="Fill" Height="21.734" Width="20.032" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" Canvas.Left="10.812" Canvas.Top="9.859" Data="M19.71875,3.8585415 C21.635416,4.7856255 23.145834,6.2179165 24.25,8.1554165 C25.3125,10.009583 25.84375,12.030416 25.84375,14.217916 C25.84375,15.895 25.5,17.478333 24.8125,18.967916 C24.083334,20.52 23.0625,21.775208 21.75,22.733541 L23.484375,24.092916 L17.90625,25.592916 L18.421875,20.046041 L19.984375,21.280416 C21.598959,19.853333 22.40625,17.868958 22.40625,15.327291 C22.40625,12.066875 20.854166,9.5200005 17.75,7.6866665 z M13.75,3.8585415 L13.234375,9.4054165 L11.671875,8.1710415 C10.057292,9.5981245 9.25,11.5825 9.25,14.124166 C9.25,17.384583 10.802083,19.931458 13.90625,21.764791 L11.9375,25.592916 C10.03125,24.665833 8.526042,23.233541 7.421875,21.296041 C6.3489585,19.441875 5.8125,17.421041 5.8125,15.233541 C5.8125,13.556458 6.1614585,11.973125 6.859375,10.483541 C7.5885415,8.9314575 8.604167,7.6762505 9.90625,6.7179165 L8.171875,5.3429165 z" d:LayoutOverrides="HorizontalAlignment">
						<Path.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform/>
							</TransformGroup>
						</Path.RenderTransform>
					</Path>
				</Canvas>
				<Canvas Width="42" Height="42" Margin="5,0" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding SaveGameCommand, Mode=OneWay}" ManageEnableState="True"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<Path Stretch="Fill" Stroke="White" StrokeThickness="2" UseLayoutRounding="False" Data="M34.5,18 C34.5,27.112698 27.112698,34.5 18,34.5 C8.8873014,34.5 1.5,27.112698 1.5,18 C1.5,8.8873014 8.8873014,1.5 18,1.5 C27.112698,1.5 34.5,8.8873014 34.5,18 z" Cursor="Hand" RenderTransformOrigin="0.5,0.5" Fill="#00FF0000" Height="42" VerticalAlignment="Bottom" Width="42">
						<Path.RenderTransform>
							<TransformGroup>
								<ScaleTransform ScaleX="-1"/>
								<SkewTransform AngleX="0" AngleY="0"/>
								<RotateTransform Angle="0"/>
								<TranslateTransform/>
							</TransformGroup>
						</Path.RenderTransform>
					</Path>
					<Path Fill="White" Stretch="Fill" Height="21.198" Width="21.198" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" Canvas.Left="10.978" Canvas.Top="10.667" Data="M8.8371391,19.289703 L8.8371391,25.663328 L12.37486,25.663328 L12.37486,19.289703 z M6.7173715,5.8692818 L6.7173715,14.348352 C6.7173715,14.577517 6.7770495,14.751777 6.8964062,14.871133 C7.0157623,14.990489 7.1900225,15.050167 7.4191866,15.050167 L18.748486,15.050167 C19.216362,15.050167 19.4503,14.811455 19.4503,14.334029 L19.4503,5.8692818 z M3.8957891,5.8692818 C3.418364,5.8692818 3.1796515,6.10322 3.1796515,6.5710964 L3.1796515,23.257105 L5.5858741,25.663328 L8.1353245,25.663328 L8.1353245,19.304026 C8.1353245,18.826599 8.3692627,18.587887 8.8371391,18.587887 L17.31621,18.587887 C17.793634,18.587887 18.032347,18.826599 18.032347,19.304026 L18.032347,25.663328 L22.271883,25.663328 C22.510595,25.663328 22.687243,25.603649 22.801825,25.484293 C22.916407,25.364937 22.973698,25.190678 22.973698,24.961514 L22.973698,6.5710964 C22.973698,6.10322 22.739759,5.8692818 22.271883,5.8692818 L20.152115,5.8692818 L20.152115,14.334029 C20.152115,14.725518 20.013662,15.059715 19.736755,15.336622 C19.459848,15.613529 19.12565,15.751982 18.734161,15.751982 L7.4191866,15.751982 C7.027698,15.751982 6.6958876,15.613529 6.4237552,15.336622 C6.1516228,15.059715 6.0155568,14.725518 6.0155568,14.334029 L6.0155568,5.8692818 z M3.8957891,5.1674671 L22.271883,5.1674671 C22.66337,5.1674671 22.995182,5.3035336 23.267313,5.5756645 C23.539446,5.8477974 23.675512,6.1796074 23.675512,6.5710964 L23.675512,24.947189 C23.675512,25.338678 23.539446,25.672876 23.267313,25.949783 C22.995182,26.22669 22.66337,26.365143 22.271883,26.365143 L5.2994189,26.365143 L2.4778364,23.54356 L2.4778364,6.5710964 C2.4778364,6.1796074 2.6162896,5.8477974 2.8931963,5.5756645 C3.1701028,5.3035336 3.5043006,5.1674671 3.8957891,5.1674671 z" d:LayoutOverrides="HorizontalAlignment">
						<Path.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform/>
							</TransformGroup>
						</Path.RenderTransform>
					</Path>
				</Canvas>
			</StackPanel>
		</Grid>
		
        <!-- HOME SCREEN -->
		<Grid x:Name="MenuGrid" RenderTransformOrigin="0.5,0.5" Width="420" Height="550" Opacity="0" Background="{StaticResource ScreenBkgBrush}" d:IsLocked="True">
			<Grid.Projection>
				<PlaneProjection RotationY="-50" CenterOfRotationX="0"/>
			</Grid.Projection>
			<Grid.RowDefinitions>
				<RowDefinition Height="550"/>
			</Grid.RowDefinitions>
			<Grid.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Grid.RenderTransform>
            
            <!-- TOP PANEL -->
            
            <!-- BUTTONS -->
			<TextBlock Text="Sudoku" FontSize="106.667" Foreground="White" FontFamily="Segoe UI Light" HorizontalAlignment="Left" 
                       Margin="-19,-58,0,0" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment"/>
			<HyperlinkButton Margin="0" VerticalAlignment="Top" IsTabStop="False" Height="68" HorizontalContentAlignment="Right" >
				<i:Interaction.Triggers>
					<i:EventTrigger EventName="Click">
						<ic:GoToStateAction StateName="GameScreenState"/>
					</i:EventTrigger>
				</i:Interaction.Triggers>
				<i:Interaction.Behaviors>
					<n:NullValueVisibilityBehavior Value="{Binding Game, Mode=OneWay}"/>
				</i:Interaction.Behaviors>
				<Path Stretch="Fill" Stroke="LightGray" StrokeThickness="3" Width="40" 
					UseLayoutRounding="False" Data="M137.5,70 C137.5,107.27922 107.27922,137.5 70,137.5 C32.720779,137.5 2.5,107.27922 2.5,70 C2.5,32.720779 32.720779,2.5 70,2.5 C107.27922,2.5 137.5,32.720779 137.5,70 z M33.166992,72.333008 L111.16699,72.333008 M70.833,32.333019 L109.846,71.346016 M112.49997,70.5 L74.969971,108.03" 
					Cursor="Hand" RenderTransformOrigin="0.5,0.5" Fill="#00FF0000" Height="40" d:LayoutOverrides="Width" Margin="0,20,17,0">
					<Path.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform AngleX="0" AngleY="0"/>
							<RotateTransform Angle="0"/>
							<TranslateTransform/>
						</TransformGroup>
					</Path.RenderTransform>
				</Path>
			</HyperlinkButton>
			<TextBlock FontSize="21.333" Foreground="#FF75AEFF" Margin="81,99,0,0" VerticalAlignment="Top" d:LayoutOverrides="VerticalAlignment" HorizontalAlignment="Left" FontFamily="Segoe UI Symbol" Text="NEW GAME"/>
			<StackPanel Margin="77,125,0,0" Orientation="Vertical" HorizontalAlignment="Left" Width="225" VerticalAlignment="Top">
				<HyperlinkButton x:Name="hyperlinkButton1" IsTabStop="False" Margin="0,-17,0,0" RenderTransformOrigin="0.5,0.5" Opacity="0">
					<HyperlinkButton.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform/>
							<TranslateTransform X="40"/>
						</TransformGroup>
					</HyperlinkButton.RenderTransform>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="Click">
							<n:ExecuteCommandAction Command="{Binding NewGameCommand, Mode=OneWay}"
								Parameter="Easy"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock Text="easy" FontSize="64" Foreground="White" FontFamily="Segoe UI Light" Margin="0" 
                               VerticalAlignment="Top" d:LayoutOverrides="Width" d:IsLocked="True"/>
				</HyperlinkButton>
				<HyperlinkButton x:Name="hyperlinkButton2" IsTabStop="False" Margin="0,-17,0,0" RenderTransformOrigin="0.5,0.5" Opacity="0">
					<HyperlinkButton.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform/>
							<TranslateTransform X="80"/>
						</TransformGroup>
					</HyperlinkButton.RenderTransform>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="Click">
							<n:ExecuteCommandAction Command="{Binding NewGameCommand, Mode=OneWay}"
								Parameter="Medium"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock Text="medium" FontSize="64" Foreground="White" FontFamily="Segoe UI Light" Margin="0" VerticalAlignment="Top" HorizontalAlignment="Left" d:IsLocked="True"/>
				</HyperlinkButton>
					<HyperlinkButton x:Name="hyperlinkButton3" IsTabStop="False" Margin="0,-17,0,0" RenderTransformOrigin="0.5,0.5" Opacity="0">
						<HyperlinkButton.RenderTransform>
							<TransformGroup>
								<ScaleTransform/>
								<SkewTransform/>
								<RotateTransform/>
								<TranslateTransform X="120"/>
							</TransformGroup>
						</HyperlinkButton.RenderTransform>
						<i:Interaction.Triggers>
							<i:EventTrigger EventName="Click">
								<n:ExecuteCommandAction Command="{Binding NewGameCommand, Mode=OneWay}"
									Parameter="Hard"/>
							</i:EventTrigger>
						</i:Interaction.Triggers>
				<TextBlock Text="hard" FontSize="64" Foreground="White" FontFamily="Segoe UI Light" Margin="0" 
                           VerticalAlignment="Top" d:LayoutOverrides="Width" d:IsLocked="True"/>
					</HyperlinkButton>
				<HyperlinkButton x:Name="hyperlinkButton4" IsTabStop="False" Margin="0,-17,0,0" RenderTransformOrigin="0.5,0.5" Opacity="0">
					<HyperlinkButton.RenderTransform>
						<TransformGroup>
							<ScaleTransform/>
							<SkewTransform/>
							<RotateTransform/>
							<TranslateTransform X="160"/>
						</TransformGroup>
					</HyperlinkButton.RenderTransform>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="Click">
							<n:ExecuteCommandAction Command="{Binding NewGameCommand, Mode=OneWay}"
								Parameter="Expert"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock Text="expert" FontSize="64" Foreground="White" FontFamily="Segoe UI Light" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="0" d:IsLocked="True"/>
				</HyperlinkButton>
				
			</StackPanel>
			<TextBlock FontSize="21.333" Foreground="#FF75AEFF" Margin="81,423,0,0" VerticalAlignment="Top" 
                       HorizontalAlignment="Left" FontFamily="Segoe UI Symbol" Text="SAVED GAME"/>
			<HyperlinkButton x:Name="hyperlinkButton" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="79,433,0,0" 
			IsTabStop="False" RenderTransformOrigin="0.5,0.5" IsEnabled="False" Opacity="0">
				<HyperlinkButton.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform X="200"/>
					</TransformGroup>
				</HyperlinkButton.RenderTransform>
				<i:Interaction.Triggers>
					<i:EventTrigger EventName="Click">
						<n:ExecuteCommandAction Command="{Binding RestoreGameCommand, Mode=OneWay}" 
							ManageEnableState="True"/>
					</i:EventTrigger>
				</i:Interaction.Triggers>
				<TextBlock Text="resume" FontSize="64" Foreground="White" FontFamily="Segoe UI Light">
					<i:Interaction.Triggers>
						<n:ValueSwitchTrigger Source="{Binding IsEnabled, ElementName=hyperlinkButton, Mode=OneWay}">
							<n:SetPropertyAction PropertyName="Opacity" n:ValueSwitchTrigger.CaseValue="True" Value="1"/>
							<n:SetPropertyAction PropertyName="Opacity" n:ValueSwitchTrigger.CaseValue="False" Value="0.2"/>
						</n:ValueSwitchTrigger>
					</i:Interaction.Triggers>
				</TextBlock>
			</HyperlinkButton>
		</Grid>
        
        <!-- USER INPUT PANEL -->
		<Border x:Name="boxValueBorder" Background="#CB2E2E2E" RenderTransformOrigin="0.5,0.5" Visibility="Collapsed" Opacity="0" d:IsLocked="True">
            
            <!-- BUTTONS -->
			<Border x:Name="border1" BorderBrush="#FF101010" BorderThickness="2" Width="300" Height="330" 
                    Cursor="Hand" RenderTransformOrigin="0.5,0.5">
				<Border.Projection>
					<PlaneProjection RotationX="-90"/>
				</Border.Projection>
				<Border.Effect>
					<DropShadowEffect ShadowDepth="0" BlurRadius="48"/>
				</Border.Effect>
				<Grid Background="Black">
					<Grid.RowDefinitions>
						<RowDefinition Height="0.25*"/>
						<RowDefinition Height="0.25*"/>
						<RowDefinition Height="0.24*"/>
						<RowDefinition Height="0.25*"/>
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition/>
						<ColumnDefinition/>
						<ColumnDefinition/>
					</Grid.ColumnDefinitions>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="One">
						<Border.Background>
							<SolidColorBrush/>
						</Border.Background>
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="1" TextWrapping="Wrap" FontFamily="Segoe UI Light"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Column="1"
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Two">
						<Border.Background>
							<SolidColorBrush/>
						</Border.Background>
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="2" TextWrapping="Wrap" FontFamily="Segoe UI Light"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0,0.5" Grid.Column="3" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Three">
						<Border.Background>
							<SolidColorBrush/>
						</Border.Background>
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="3" TextWrapping="Wrap" FontFamily="Segoe UI Light"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Row="1" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Four">
						<Border.Background>
							<SolidColorBrush/>
						</Border.Background>
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="4" TextWrapping="Wrap" FontFamily="Segoe UI Light"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Column="1" Grid.Row="1" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Five">
						<Border.Background>
							<SolidColorBrush/>
						</Border.Background>
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="5" TextWrapping="Wrap" FontFamily="Segoe UI Light"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0,0.5" Grid.Column="3" Grid.Row="1" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Six">
						<Border.Background>
							<SolidColorBrush/>
						</Border.Background>
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="6" TextWrapping="Wrap" FontFamily="Segoe UI Light"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Row="2" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Seven">
						<Border.Background>
							<SolidColorBrush/>
						</Border.Background>
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="7" TextWrapping="Wrap" FontFamily="Segoe UI Light"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Column="1" Grid.Row="2" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Eight">
						<Border.Background>
							<SolidColorBrush/>
						</Border.Background>
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="8" TextWrapping="Wrap" FontFamily="Segoe UI Light"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0,0.5" Grid.Column="3" Grid.Row="2" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Nine">
						<Border.Background>
							<SolidColorBrush/>
						</Border.Background>
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="9" TextWrapping="Wrap" FontFamily="Segoe UI Light"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0" Grid.Row="3" Margin="0,0,-30,0" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="None" Background="#FF1A1A1A">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32" Foreground="White" 
                                   Text="Clear" TextWrapping="Wrap" FontFamily="Segoe UI Light"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0" Grid.Column="3" Grid.Row="3" 
						Margin="-69,0,0,0" MouseLeftButtonUp="OnSelectBoxValue" Tag="" Background="#FF2E2E2E">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32" Foreground="White" 
                                   Text="Cancel" TextWrapping="Wrap" FontFamily="Segoe UI Light"/>
					</Border>
				</Grid>
			</Border>
		</Border>
        
        <!-- MESSAGE PANEL -->
		<Border x:Name="messageBorder" Background="#CB2E2E2E" Opacity="0" Visibility="Collapsed" d:IsLocked="True">
			<Border x:Name="border" HorizontalAlignment="Center" VerticalAlignment="Center" MaxHeight="450" RenderTransformOrigin="0.5,0.5" Background="Black" BorderBrush="#FF101010">
				<Border.Projection>
					<PlaneProjection RotationX="-90"/>
				</Border.Projection>
				<Border.Effect>
					<DropShadowEffect ShadowDepth="0" BlurRadius="48"/>
				</Border.Effect>
				<Grid>
                    
                    <!-- MESSAGE -->
					<TextBlock x:Name="messageText" Margin="12,8,12,65" VerticalAlignment="Top" FontFamily="Segoe UI Light" 
                               FontSize="24" Foreground="White" Text="The puzzle has not been completely solved." TextWrapping="Wrap"/>
                    
                    <!-- OK BUTTON -->
					<Border BorderThickness="1" BorderBrush="White" Cursor="Hand" 
						Margin="8,0,22,10" Height="33" HorizontalAlignment="Right" VerticalAlignment="Bottom" 
						Width="104" MouseLeftButtonUp="OnMessageClose" Background="Transparent">
						<TextBlock HorizontalAlignment="Center" Margin="15,0" VerticalAlignment="Center" 
                                   FontSize="16" Foreground="White" Text="ok" TextWrapping="Wrap"/>
					</Border>
                    
				</Grid>
                
			</Border>
		</Border>
		<nRoute_Samples_Sudoku_Controls:WorkingIndicator d:IsHidden="True"/>
	</Grid>
</UserControl>